<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%option explicit%>
<%
Dim RZ_IN
RZ_IN=1
%>
<!--#include file="../conn.inc.asp" -->
<!--#include file="admin_inc/admin.function.asp" -->
<!--#include file="admin_inc/admin.sqlfunction.asp" -->
<%
checkadmin(1)
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>留言列表</title>
<link type="text/css" href="style/style.css" rel="stylesheet" rev="stylesheet"/>
<script type="text/javascript" language="javascript" src="admin_js/common.js"></script>
</head>
<body>
<br/>
<div class="addrecord">
<%
dim page,sql,MyPage,rs,msgtype
page=GetIntQueryString("page")
dim typeid
typeid=GetIntQueryString("id")

call ShowMyChild("guestbook",typeid)%>

</div>
<form name="rzform" action="batch_delete.asp" method="post" id="rzform">
<input type="hidden" name="listtype" value="comment"/>
<table cellspacing="0" cellpadding="0" class="table_800">
<tr>
<th class='tdcenter'>选择</th>
<th class='tdcenter'>序号</th>
<th class='tdcenter'>标题</th>
<th class='tdcenter'>昵称</th>
<th class='tdcenter'>留言时间</th>
<th class='tdcenter'>回复时间</th>
<th class='tdcenter'>审核状态</th>
<th class='tdcenter'>操作</th>
</tr>
<%
if typeid=0 then
sql="select * from c_comment  order by id desc"
else 
sql="select * from c_comment where  path like '%,"&cstr(typeid)&",%'  order by id desc"
end if 
if page<=1 then
page = 1
end if
Set MyPage = New RZPage
MyPage.SetSQL = sql
MyPage.PageSize = 20
MyPage.SetCss_PreNext="nextprev"
MyPage.SetCss_NumPage="pagenum"
MyPage.SetCss_CurrentPage="currentpage"
Set rs = MyPage.GetRS()
dim i
For i=1 To MyPage.PageSize
If Not rs.EOF Then 
%> 
<tr class="row">
<td class='tdcenter'><input type="checkbox" name="id" id="id" value="<%=rs("id")%>"  onclick="chkRow(this);"/></td>
<td class='tdcenter'>
<%
if page<=1 then 
response.write(i)
else
response.write((page-1)*MyPage.PageSize+i)
end if 
%>
</td>
<td>&nbsp;
<%
Dim sql1,rs1
Set rs1=server.CreateObject("adodb.recordset")
sql1="select * from c_type where id="&rs("typeid")
rs1.open sql1,conn,1,1
If Not rs1.eof Then
response.write("["&rs1("name")&"]")
End If 
rs1.close
Set rs1=nothing
%>
	<a href="comment_show.asp?id=<%=rs("id")%>">
<%=rs("title")%></a><%If rs("lang")=1 Then %><img src="images/english.gif" width="13" height="13" alt="English" /><%End If%>
</td>
<td class='tdcenter'><%=rs("author")%></td>
<td class='tdcenter'><%=rs("addtime")%></td>
<td class='tdcenter'><%If Year(rs("replytime"))=2000 Then response.write("未回复") Else response.write(rs("replytime"))%></td>
<td class="tdcenter">
<a href="comment_changestate.asp?fr=commentlist&id=<%=rs("id")%>">
<%If rs("visible")=1 Then response.write("通过") Else response.write("未通过") End If %>
</a>
</td>
<td class='tdcenter'><a href="comment_show.asp?id=<%=rs("id")%>#reply">回复</a>&nbsp;<a href="comment_edit.asp?id=<%=rs("id")%>">修改</a>&nbsp;<a href="comment_delete.asp?id=<%=rs("id")%>">删除</a>
&nbsp;
</td>
</tr>
<%
rs.Movenext
Else
Exit For
End If
Next
%>
<tr>
<td colspan="8" class="tdcenter">
<input name="selectall" type="checkbox" id="selectall" value="" onclick="selectAll();" />全选&nbsp;&nbsp;<select name="upper" id="upper">
<%Call ShowTypeOptions("add_modify_comment","","","",1,1)%>
</select>
<input type="button"  class="btn" name="spec" onclick="batchtype();" value="批量修改分类"/>&nbsp;&nbsp;&nbsp;<input type="button"  class="btn" name="del" onclick="deleteselect();" value="批量删除"/>
</td>
</tr>
</table>
</form>
<div id="bottompage">
<%MyPage.ShowPage()%>
<span class="recordcount">
<%MyPage.ShowPageInfo()%>
</span>
</div>
</body>
</html>